package 方法的抽象和逐步求精;

public class Exercise5_6 {

	/**
	 *    1
	 *   21
	 *  321 
	 *  
	 * @param n
	 */
	public static void displayPattern(int n){
		for (int row = 1; row <= n; row++) {
			for (int i = row; i < n; i++) {
				System.out.print("*");
			}
			for (int i = row; i >= 1; i--) {
				System.out.print(i);
			}
			System.out.println();
		}
		
	}
	
	public static void main(String[] args) {
		displayPattern(8);
	}
}
